
import { Column, Table } from 'sequelize-typescript';
import { BaseModel } from '@/model'
import { DataTypes } from "sequelize";

@Table
export class Dept extends BaseModel {
	@Column({ type: DataTypes.STRING, allowNull: false, comment: '部门名称' })
	name: string;

	@Column({ type: DataTypes.STRING, allowNull: false, comment: "父级部门id" })
	parentId: string;

	@Column({ type: DataTypes.STRING, allowNull: false, comment: "部门编码" })
	deptCode: string;

	@Column({ type: DataTypes.INTEGER, defaultValue: 0, comment: "部门等级" })
	deptLevel: number;

	@Column({ type: DataTypes.INTEGER, defaultValue: 1, comment: "部门类型" })
	deptType: number;

	@Column({ type: DataTypes.BOOLEAN, comment: "启用状态" })
	isLock: boolean;

	@Column({ type: DataTypes.INTEGER, defaultValue: 0, comment: "部门排序" })
	weight: number;
}
